#ifndef _UART_DATA_H_
#define _UART_DATA_H_


#define RESET_WIFI           (0x0011)           //WiFi配网
#define NETWORK_STATUS       (0x0005)           //网络状态
#define GET_RECIPE           (0x0001)           //获取菜谱
#define ERR_CODE             (0x0021)           //故障码
// #define SEND_SN_MAC          (0x0031)           //思维斯（不使用）
#define GET_NET_TIME         (0x0002)           //获取网络时间

//id错误
#define SEND_ID_ERR_MESSAGE()      do { \
                                    char err_buf[] = {0xaa, 0x55, 0x05, 0x00, 0x01, 0x85, 0x01, 0x8b, 0x55, 0xaa}; \
                                    uart_write_bytes(UART_DATA_NUM, err_buf, sizeof(err_buf)); \
                                     } while (0) 
//菜谱过期
#define SEND_OVERLIFE_ERR_MESSAGE()      do { \
                                    char err_buf[] = {0xaa, 0x55, 0x05, 0x00, 0x01, 0x85, 0x02, 0x8c, 0x55, 0xaa}; \
                                    uart_write_bytes(UART_DATA_NUM, err_buf, sizeof(err_buf)); \
                                    } while (0)                                    
typedef enum
{
    NORMAL_RUNNING = -1,        //正常使用
    WIFI_DISCONNECTED = 0,      //WiFi未连接
    SERVER_DISCONNECTED,        //服务器未连接
    SERVER_NOT_EXIST_SN,        //服务器不存在sn
}RespStatus_t;

void UartDataRecvTask(void *param);
uint16_t GetSTCVersion(void);
void ResponseWifiStatus(RespStatus_t status);



#endif